package day_240425.Fibonacci;

public class F {

    int first = 1;
    int second = 1;

    public int f(int n) {
        if (n <= 2){
            return 1;
        }
        for (int i = 1; i <= n - 2; i++) {
            int temp = second;
            second = first + second;
            first = temp;
        }
        return second;
    }
}
